/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.sbbs.springboot.sample24;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author Administrator
 */
@RestController
public class TaskController {

    @Autowired
    Task1 task1;
    @Autowired
    Task2 task2;
//测试task1.

    @RequestMapping("/task1")
    public String task1() throws Exception {
        task1.doTaskOne();
        task1.doTaskTwo();
        task1.doTaskThree();
        return "task1";
    }

    @RequestMapping("/task2")
    public String task2() throws Exception {
        task2.doTaskOne();
        task2.doTaskTwo();
        task2.doTaskThree();
        return "task2";
    }

}
